package com.punch.common.dto.course;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * ClassDTO-班级信息 表单
 *
 * @author xiaol
 * @version 1.0.0
 * @since 2020/7/21
 */
@Data
public class AdminEditClassDTO implements Serializable {

    /**
     * 开班日期
     */
    @ApiModelProperty(name = "planOpenDate", notes = "开班日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate planOpenDate;


    /**
     * 报名开始时间
     */
    @ApiModelProperty(name = "signUpStartTime", notes = "报名开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private LocalDateTime signUpStartTime;

    /**
     * 报名结束时间
     */
    @ApiModelProperty(name = "signUpEndTime", notes = "报名结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private LocalDateTime signUpEndTime;


    /**
     * 课程适用年级名称  1-6年级多选
     */
    @ApiModelProperty(name = "courseGrade", notes = "课程适用年级名称  1-6年级多选")
    @NotNull(message = "适用年级不能为空")
    private List<Integer> courseGrade;

    /**
     * 上课周期 星期几，多选
     */
    @ApiModelProperty(name = "courseWeek", notes = "上课周期 星期几，多选,多个,分割")
    @NotNull(message = "上课周期不能为空")
    private List<Integer> courseWeek;
    /**
     * 上课时间
     */
    @ApiModelProperty(name = "classTime", notes = "上课时间")
    @NotBlank(message = "上课时间不能为空")
    private String classTime;

    private Integer courseHourCount;
    /**
     * 课时单价：单位元，精度两位小数
     */
    @ApiModelProperty(name = "courseHourPrice", notes = "课时单价：单位元，精度两位小数")
    private BigDecimal courseHourPrice;
    /**
     * 是否包含教材/教具：勾选框，默认否  0否  1是
     */
    @ApiModelProperty(name = "containMaterialFlag", notes = "是否包含教材/教具：勾选框，默认否  0否  1是")
    private Integer containMaterialFlag;
    /**
     * 教材名称/教具名称
     */
    @ApiModelProperty(name = "courseMaterialName", notes = "教材名称/教具名称")
    private String courseMaterialName;
    /**
     * 教材/教具单价
     */
    @ApiModelProperty(name = "courseMaterialPrice", notes = "教材/教具单价")
    private BigDecimal courseMaterialPrice;
    /**
     * 是否必须购买：勾选框，默认否    0否  1是
     */
    @ApiModelProperty(name = "requireBuyFlag", notes = "是否必须购买：勾选框，默认否    0否  1是")
    private Integer requireBuyFlag;

    /**
     * 上课教室id  单选非禁用教室
     */
    @ApiModelProperty(name = "classRoomId", notes = "上课教室id  单选非禁用教室")
    @NotNull(message = "教室不能为空")
    private Long classRoomId;

    /**
     * 上课教室id  单选非禁用教室
     */
    @ApiModelProperty(name = "classRoomId", notes = "上课教室id  单选非禁用教室")
    @NotEmpty(message = "教室不能为空")
    private String classRoomName;

    /**
     * 最少上课人数
     */
    @ApiModelProperty(name = "stuNoMin", notes = "最少上课人数")
    @NotNull(message = "人数范围不能为空")
    private Integer stuNoMin;
    /**
     * 最多上课人数
     */
    @ApiModelProperty(name = "stuNoMax", notes = "最多上课人数")
    @NotNull(message = "人数范围不能为空")
    private Integer stuNoMax;

    /**
     * 上课老师id
     */
    @ApiModelProperty(name = "teacherId", notes = "上课老师id")
    private Long teacherId;

    /**
     * 上课老师id
     */
    @ApiModelProperty(name = "teacherName", notes = "上课老师")
    private String teacherName;

}
